package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import org.w3c.dom.Text;


public class MainActivity3 extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main3);
        TextView fromcity = findViewById(R.id.fromcity);
        fromcity.setText(MainActivity2.from.getText());
        TextView tocity = findViewById(R.id.tocity);
        tocity.setText(MainActivity2.to.getText());
        TextView textData = findViewById(R.id.textData);
        textData.setText(MainActivity2.dataString);
        ImageView back = findViewById(R.id.back);
        back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.back:
                finish();
                break;
        }

    }
}